<style type="text/css">
    .sky {
        background-color: #b5d9ff;
    }
    input{
      width: 600px;
    }
</style>
    <!-- <button class="btn btn-default m-b-lg" ng-click="Add()">Add row</button> -->
    <!-- <span ng-show="$ctrl.data.datas.length==0">表内没有可用数据</span> -->
    <div class="panel panel-default" style="padding: 5px 10px;" ng-show="$ctrl.data.datas.length==0" aria-hidden="false">暂无数据！</div>
    <table ng-show="$ctrl.data.datas.length!=0" class="table table-bordered  table-condensed bg-white-only">
        <tr style="font-weight: bold" >
            <td ng-repeat=" t in $ctrl.thdata" width="{{t.width}}">{{t.thName}}</td>
            <td style="width:10%">操作</td>
        </tr>
        <tr ng-repeat="config in $ctrl.data.datas"  ng-class="config.color" >
          
          <!-- 开启行点击事件 -->
            <td class="v-middle" ng-repeat="tdObj in $ctrl.data.tdObjs" ng-click="$ctrl.trcheck(config)" ng-if="$ctrl.data.trIsClick">
              <!-- 文本输入框 -->
                <span ng-if="tdObj.tdType=='text'" editable-text="config[tdObj.tdName]" e-name="config[tdObj.tdName]" e-form="rowform" onbeforesave="check($data);"
                      e-required>
                  {{ config[tdObj.tdName] || 'empty' }}
                </span>
                <!-- select下拉选框 -->
                <span ng-if="tdObj.tdType=='select'" editable-select="config[tdObj.tdName]" e-name="config[tdObj.tdName]" e-form="rowform" e-ng-options="g[tdObj.typeList.key] as g[tdObj.typeList.value] for g in tdObj.typeList.list"
                      e-required>
                 {{ $ctrl.selectShow(config[tdObj.tdName],tdObj.typeList.list,tdObj.typeList.key,tdObj.typeList.value) }}
                </span>
            </td>

            <!-- 关闭行点击事件 -->
             <td class="v-middle" ng-repeat="tdObj in $ctrl.data.tdObjs" ng-if="!$ctrl.data.trIsClick">
                <!-- 文本输入框 -->
                <span ng-if="tdObj.tdType=='find'"
                      >
                  {{ config[tdObj.tdName]}}
                </span>  
                <span ng-if="tdObj.tdType=='text'" editable-text="config[tdObj.tdName]"  e-form="rowform" onbeforesave="check($data);"
                      e-required>
                  {{ config[tdObj.tdName] || 'empty' }}
                </span>
                <!-- select下拉选框 -->
                <span ng-if="tdObj.tdType=='select'" editable-select="config[tdObj.tdName]"  e-form="rowform" e-ng-options="g[tdObj.typeList.key] as g[tdObj.typeList.value] for g in tdObj.typeList.list"
                      e-required>

                 {{ $ctrl.selectShow(config[tdObj.tdName],tdObj.typeList.list,tdObj.typeList.key,tdObj.typeList.value) }}
                </span>
            </td>
            <td style="white-space: nowrap">
                <form editable-form name="rowform" onshow="$ctrl.onshow(config)" onhide="$ctrl.onhide(config)" onaftersave="$ctrl.save(config)" ng-show="rowform.$visible"
                      class="form-buttons form-inline" shown="inserted == config">
                    <button type="submit" ng-disabled="rowform.$waiting" class="btn btn-sm btn-info">
                        保存
                    </button>
                    <button type="button" ng-disabled="rowform.$waiting" ng-click="rowform.$cancel()"
                            class="btn btn-sm btn-default">
                        取消
                    </button>
                </form>
                <div class="buttons" ng-show="!rowform.$visible">
                    <button class="btn btn-sm btn-info" ng-click="rowform.$show()">编辑</button>
                    <button class="btn btn-sm btn-danger" ng-click="$ctrl.remove($index)">删除</button>
                </div>
            </td>
        </tr>
    </table>
